package vboot.core.module.ass.coge.table;

import lombok.Getter;
import lombok.Setter;
import vboot.core.common.entity.BaseMainEntity;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;

@Entity
@Getter
@Setter
public class AssCogeTable extends BaseMainEntity {

    @Column(length = 64)
    private String bunam;//业务名

    private Integer ornum;//排序号

    @Column(length = 64)
    private String remark;//表描述

    @Column(length = 64)
    private String baent;//继承基类

    @Column(length = 32)
    private String edtyp;//编辑页类型

    @Column(length = 32)
    private String porid;//所属门户ID

    @Column(length = 32)
    private String pmeid;//上级菜单ID

    private Integer pecol;//每行列数

    @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
    @JoinColumn(name = "tabid")
    @OrderBy("ornum ASC")
    private List<AssCogeField> fields = new ArrayList<>();

    private Boolean addbt;//新增按钮

    private Boolean delbt;//删除按钮

    private Boolean impbt;//导入按钮

    private Boolean expbt;//导出按钮

    @Column(length = 32)
    private String rotyp;//路由类型

    @Column(length = 32)
    private String orfie;//排序字段

}
